package edu.zut.hb.software.master.service.impl;

import edu.zut.hb.software.base.service.impl.GenericManagerImpl;
import edu.zut.hb.software.master.dao.MasterDao;
import edu.zut.hb.software.master.domain.Master;
import edu.zut.hb.software.master.service.MasterService;
import edu.zut.hb.software.teacher.dao.TeacherDao;
import edu.zut.hb.software.teacher.domain.Teacher;
import edu.zut.hb.software.teacher.service.TeacherService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;
import java.util.ArrayList;
import java.util.List;


@Service
@Transactional
public class MasterServiceImpl extends GenericManagerImpl<Master,Long> implements MasterService {

	MasterDao masterDao;

    @Autowired
    public void setMasterDao(MasterDao masterDao) {
        this.masterDao = masterDao;
        this.dao=this.masterDao;
    }

    @Override
    public List list() {
        List list = new ArrayList();
        for (int i = 0; i < 10; i++) {
        	Master master = new Master();
        	master.setName("第"+i+"个大师");
        	master.setNum(i);
        	master.setStatus(true);
            list.add(master);
        }
        return list;
    }
}
